package com.shioirikukuri.service.impl;

import com.shioirikukuri.entity.UserMember;
import com.shioirikukuri.mapper.UserMemberMapper;
import com.shioirikukuri.service.IUserMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserMemberServiceImpl implements IUserMemberService {
	@Autowired
	private UserMemberMapper userMemberMapper;



	@Override
	public void createUserMember(UserMember userMember) {
		userMemberMapper.insertUserMember(userMember);
	}

	@Override
	public UserMember getUserMemberById(Long id) {
		return userMemberMapper.selectUserMemberById(id);
	}

	@Override
	public UserMember getUserMemberByUserId(Long userId) {
		return userMemberMapper.selectUserMemberByUserId(userId);
	}

	@Override
	public List<UserMember> getAllUserMembers() {
		return userMemberMapper.selectAllUserMembers();
	}

	@Override
	public void updateUserMember(UserMember userMember) {
		userMemberMapper.updateUserMember(userMember);
	}

	@Override
	public void deleteUserMemberById(Long id) {
		userMemberMapper.deleteUserMemberById(id);
	}



}